#include <stdio.h>

const char *dev="/dev/pts/1";

int main()
{
	int count=10;
	FILE* fp=fopen(dev,"w");
	if(fp==NULL)
	{
		printf("open %s error!\n",dev);
		return 1;
	}
	while(count--)
	{
		fprintf(fp,"cs print %d\n",count);
		sleep(1);
	}
	fclose(fp);
	return 0;
}

